package character;

/**
 * Parents.
 * @author pcdejager
 */
public final class Parents {
    /**
     * Create a parents class with no parents.
     * @return The empty parents class
     */
    public static Parents create() {
        return new Parents(null, null);
    }
    /**
     * Create a parents class with given father and mother.
     * @param f The father (Gender must be MALE)
     * @param m The mother (Gender must be FEMALE)
     * @return The parents class
     */
    public static Parents create(final Character f, final Character m) {
        if ((f == null) || (m == null)) {
            return null;
        }
        if ((f.getGender() != Gender.MALE)
                || (m.getGender() != Gender.FEMALE)) {
            return null;
        }
        return new Parents(f, m);
    }
    /**
     * Get the father.
     * @return The father
     */
    public Character getFather() {
        return father;
    }
    /**
     * Get the mother.
     * @return The mother
     */
    public Character getMother() {
        return mother;
    }
    /**
     * Private constructor.
     * @param f The father
     * @param m The mother
     */
    private Parents(final Character f, final Character m) {
        father = f;
        mother = m;
    }
    /**
     * The father.
     */
    private final Character father;
    /**
     * The mother.
     */
    private final Character mother;
}

